<template>
	<view class="hot_card">
		<view class="img_wrap">
			<img class="hot_card_img" :src="item.src"/>
			<view class="hot_card_amount">
				{{item.remaining}}/{{item.amount}}
			</view>
		</view>
		<p class="hot_card_title">{{item.title}}</p>
		<p class="hot_card_price">￥{{item.price}}</p>
		<view class="hot_card_btn">
			<u-button @click="check(item.serialNo)" size="small" text="预约" color="var(--echo-main-color)">
			</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show:false
			}
		},
		props: {
			item: {
				type: Object
			},
		},
		methods:{
			check(serialNo){
				let token = uni.getStorageSync('setStorageSync')
				if (!this.openid) {
					uni.$u.toast('请先登陆')
					return
				}
				uni.navigateTo({
					url: "/pages/my/myNftDetailTheme?exhibitionType=NFT" + "&serialNo=" + serialNo
				})
				console.log('check')
			},
		}
	}
</script>

<style lang="scss" scoped>
	.hot_card {
		position: relative;
		background: rgba(255, 255, 255, 0.1);
		border-radius: 40rpx;
		margin-bottom: 40rpx;
		.img_wrap {
			position: relative;
			.hot_card_img {
				border-radius: 40rpx;
				width: 100%;
				margin-bottom: 20rpx;
			}
			.hot_card_amount{
				background-color: rgba(0,0,0,0.4);
				color: #fff;
				position: absolute;
				right: 20rpx;
				bottom: 40rpx;
				text-align: center;
				width: 160rpx;
				height: 80rpx;
				line-height: 80rpx;
				border-radius: 40rpx;
			}
		}
		p {
			padding: 0rpx 20rpx 20rpx;
			font-size: 16px;
			color: #fff;
		}
		.hot_card_btn {
			position: absolute;
			right: 20rpx;
			bottom: 20rpx;
		}
	}
</style>
